/*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * $Id: LogEventProducer.java 401 2007-02-10 11:23:44Z jack.rybicki $
 */
package logmatcher;


/**
 * The LogBuffer class stores messages and forwards them to
 * message listeners. 
 *
 * @version $Revision: 401 $
 */
public interface LogEventProducer {
    //~ Methods --------------------------------------------------------------------------------------------------------

    /**
     *  Add message listener. This method should be used when no filter is installed for message listener.
     *
     *  @param listener the message listener
     */
    void addLogEventListener(LogEventListener listener);


    /**
     *  Add message listener together with its filter. There can be many filters configured for one listener using this method.
     *  The message listener will be notified about a message each time when any of its filters accepts the message. 
     *
     *  @param listener the message listener
     *  @param filter the filters to be used before notifying message listener
     */
    void addLogEventListener(LogEventListener listener, InputFilter filter);
}
